export default class FrameData {
    constructor(visible, alpha, rotation, x, y, scaleX, scaleY, skewX, skewY) {
        if (typeof alpha === "undefined") {
            alpha = 100;
        }
        if (typeof rotation === "undefined") {
            rotation = 0;
        }
        if (typeof x === "undefined") {
            x = 0;
        }
        if (typeof y === "undefined") {
            y = 0;
        }
        if (typeof scaleX === "undefined") {
            scaleX = 1;
        }
        if (typeof scaleY === "undefined") {
            scaleY = 1;
        }
        if (typeof skewX === "undefined") {
            skewX = 0;
        }
        if (typeof skewY === "undefined") {
            skewY = 0;
        }
        this.visible = visible;
        this.alpha = alpha;
        this.rotation = rotation;
        this.x = x;
        this.y = y;
        this.scaleX = scaleX;
        this.scaleY = scaleY;
        this.skewX = skewX;
        this.skewY = skewY;
    }

    clone() {
        return new FrameData(this.visible, this.alpha, this.rotation, this.x, this.y, this.scaleX, this.scaleY);
    };
    applyTransform(e) {
        e.visible = this.visible;
        if (!e.visible)
            return;
        e.alpha = this.alpha;
        e.rotation = this.rotation;
        e.x = this.x;
        e.y = this.y;
        e.scaleX = this.scaleX;
        e.scaleY = this.scaleY;
        e.skewX = this.skewX;
        e.skewY = this.skewY;
    };
    getEmptyData() {
        if (!FrameData.empty)
            FrameData.empty = new FrameData(false, 0, 0, 0, 0, 0, 0);
        return FrameData.empty;
    };
}